home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93b.txt
/
000033_icon-group-sender _Tue Apr 27 01:52:23 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1993-06-16
|
2KB
Received: by cheltenham.cs.arizona.edu; Wed, 28 Apr 1993 04:50:04 MST
Date: 27 Apr 93 01:52:23 GMT
From: elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uwm.edu!linac!uchinews!ellis!goer@ames.arc.nasa.gov (Richard L. Goerwitz)
Organization: University of Chicago
Subject: Re: Help!
Message-Id: <1993Apr27.015223.18496@midway.uchicago.edu>
References: <Apr26.234849.37604@yuma.ACNS.ColoState.EDU>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
erholm@CS.ColoState.EDU (scott erholm) writes:
>
>In Pascal, I could pass values to and from procedures in this manner:
>
>Procedure P (VAR x, y, z : Integer; l, m : Real);
> (* procedure body *)
>end;
>
>And the call to P would look like this:
>
>P (a, b, c, 10, 20);
>
>meaning that procedure P would get 10 and 20 for l and m, and would
>pass the values of x, y, and z back to the calling program.
So-called "var" parameters in Pascal are a way of introducing side-
effects. These are not permitted in Icon per se. One usually does
not want or need them, although I have often wondered whether adding
them would be difficult - if they were done precisely as in Pascal
(i.e. not as in C, which might break Icon's type-safe scheme).
Show us what you want to do in Icon, and I'll bet someone here will
gladly suggest how to do it.
The question is whether you should pass a structure, or whether you
are approaching the whole problem in an "Iconish" fashion. Be pretty
specific, and I'm sure you'll get some cogent suggestions.
--
-Richard L. Goerwitz goer%midway@uchicago.bitnet
goer@midway.uchicago.edu rutgers!oddjob!ellis!goer